package cn.buk.tms.factory;

import cn.buk.common.dto.eterm.PnrDto;
import cn.buk.tms.entity.misc.Pnr;
import org.springframework.beans.BeanUtils;

public class PnrFactory {

    public static Pnr createByPnrDto(PnrDto dto) {
        Pnr pnr = new Pnr();
        BeanUtils.copyProperties(dto, pnr);

        pnr.setDport(dto.getDport());
        pnr.setAport(dto.getAport());
        pnr.setDdate(dto.getDdate());
        pnr.setDtime(dto.getDtime());

        return pnr;
    }


}
